<template>
  <div style="min-height: 360px">
    <table class="mytable">
      <tr>
        <td style="width: 25%">建议分类</td>
        <td>{{state.entity.yijiantypestr}}</td>
      </tr>
      <tr>
        <td>提交时间</td>
        <td><DateFormat :value="state.entity.createtime" :format="'YYYY-MM-DD HH:mm'"></DateFormat></td>
      </tr>
      <tr>
        <td>建议内容</td>
        <td>{{state.entity.contents}}</td>
      </tr>
    </table>
  </div>
</template>

<script lang="ts" setup>
import axios from "axios";
import {reactive, ref, onMounted, defineProps, defineEmits, nextTick} from "vue";
let props = defineProps({
  entityId : {type : Number, default: 0}
})
const state = reactive({
  entity:{}
})
const getEntity = ()=>{
  axios.post('/yijian/getyijianbox',{id : props.entityId}).then( (res) =>{
    const {code,msg, data} = res;
    if(code == '200'){
      state.entity = data
    }
  })
}
onMounted(()=>{
  getEntity();
})
</script>

<style scoped>

</style>
